<!doctype html>
<html>
  <head>
  	<meta http-equiv="content-type" content=""text/htm; charset=UTF-8" >
	<link href="default.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="jquery/jquery.js"></script>
    
    
	<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  	
  	
  	
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script>  	
  	<script type="text/javascript" src="jquery/jquery.jeditable.js"></script>
  	
  	
  	
  
    <script type="text/javascript">
     
    </script>
  </head>
  <body>
  <style type="text/css">
	.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
	</style>
<script>

$(window).bind('select', function() {alert("Hello");}); 



</script>
<?php
require 'nette/Nette/loader.php';
Debug::enable();
require 'db.php';
require 'localization/lang.php';
require 'core/core.sanitizer.php';
require 'core/core.usermanagement.php';
require 'core/core.jobs.php';
require 'core/core.dfs.php';
require 'visual/visual.dfs.php';
require 'core/core.time.php';
require 'core/core.attendance.php';
require 'visual/visual.tasks.php';

$dfs = new core_dfs($spojeni, 'tree');



if ($_POST['posli']=="add subnode") {
  //$dfs->add_node($_POST['PID'],$_POST['LEVEL'],$_POST['left'],$_POST['name']);
  $node = new core_dfs_node($spojeni, 'tree');
  $node->PID=$_POST['PID'];
  $node->LEVEL=$_POST['LEVEL'];
  $node->left=$_POST['left'];
  $node->name=$_POST['name'];
  $node->users=$_POST['users'];
  $node->disabled=$_POST['disabled'];
  $tmp=$node->add_validate();
  echo $tmp;
  $node->add();
  }




//$dfs_wiev = new visual_dfs($spojeni, 'tree');
//echo $dfs_wiev->showtree(1);
//$dfs->DFS_MAIN();

//$user=new core_user;
//$user->login="test";
//$user->name="Jozi Mrkvicka";
//$user->email="jozko@jozko.com";
//$user->role="1";
//$user->passwd="test";
//$user->passwd2="test";
//$user->setid(1);

//echo $user->adduser_validate();
//$user->adduser();
//echo $user->edituser_validate();
//echo $user->edituser();

//$node2=new core_dfs_node($spojeni, 'tree');
//$node2->setid(3);
//$node2->name="thefakeroot";
//echo $node2->edit_validate();
//echo $node2->edit();
//secho('napis neco pekneho '.$user->login.' za tim nasleduje <script></script>');

//$query=mysql_real_escape_string("insert into ".$user->login." (PID,LEVEL,name,left_state,right_state) values (".$user->login.",".$user->login.",'".$user->login."',".$user->login.",".$user->login.")");
//echo $query;
//mktime(hour, minute, second, month, day, year)
$datetime = new core_time;
$datetime->time='00:01';
$datetime->date='1:12:1984';
$datetime->timestamp=$datetime->totimestamp();
echo $datetime->tosec('00:00');
//echo $datetime->verify_time_format();
//echo $datetime->verify_date_format();
//echo $datetime->totimestamp();
//echo "<br>".$datetime->todate();
//echo "<br>".$datetime->totime();

//$job=new core_job;
//$job->jid=12;
//$job->uid="1";
//$job->jdesc="";
//$job->from="140";
//$job->to="160";
//$job->duration="20";
//$job->login="test";
//$job->note="ci vstup";
//$job->id=4;
//echo $job->edit_validate();
//echo $job->delete();

//echo "<br>".$job->returnjobpath();



//echo(mktime(01,24,12,01,01,1986));


//$attend=new core_attendance;
//$attend->day=100;
//$attend->att=200;
//$attend->id=2;
//echo $attend->edit_validate();
//echo $attend->edit();

//$tasks=new visual_tasks(1,"1:1:2010");
//echo $tasks->visual_tasks_simple_view();


mysql_close($spojeni);
?>
</body>
</html>
